﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NLBS.Entity;
using System.ServiceModel;

namespace NLBS.Data.Interface
{
    [ServiceContract]
    public interface ICategoryService
    {
        #region Category
        /// <summary>
        /// 获取分类列表
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        IList<Category> GetCategory();

        /// <summary>
        /// 根据分类的Id获取一个分类对象
        /// </summary>
        /// <param name="catID">分类的ID</param>
        /// <returns></returns>
        [OperationContract]
        Category GetCategoryByID(int catID);

        /// <summary>
        /// 新增一个分类
        /// </summary>
        /// <param name="cat"></param>
        /// <returns></returns>
        [OperationContract]
        int InsertCategory(Category cat);

        /// <summary>
        /// 更新一个分类
        /// </summary>
        /// <param name="cat">分类的ID</param>
        [OperationContract]
        void UpdateCategory(Category cat);

        /// <summary>
        /// 根据分类的ID删除一个分类
        /// </summary>
        /// <param name="catID"></param>
        [OperationContract]
        void DeleteCategory(int catID);

        /// <summary>
        /// 转移日志到指定的分类
        /// </summary>
        /// <param name="catIDList">分类列表</param>
        /// <param name="newCatID">新的分类</param>
        [OperationContract]
        void MoveCategory(string catIDList, int newCatID);

        [OperationContract]
        void UpdateCategoryCounter(int catID);

        #endregion
    }
}
